package com.ylb.rent.service.impl;

import java.util.List;
import java.util.stream.Collectors;

import com.ylb.rent.entity.vo.ApartmentSchoolVo;
import com.ylb.rent.service.ISchoolService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
 import com.ylb.rent.dao.SchoolApartmentDistMapper;
import  com.ylb.rent.entity.SchoolApartmentDist;
import com.ylb.rent.service.ISchoolApartmentDistService;

/**
 * 学校公寓Service业务层处理
 * 
 * @author ylb
 * @date 2023-06-29
 */
@Service
public class SchoolApartmentDistServiceImpl implements ISchoolApartmentDistService 
{
    @Autowired
    private SchoolApartmentDistMapper schoolApartmentDistMapper;


    /**
     * 查询学校公寓
     * 
     * @param id 学校公寓主键
     * @return 学校公寓
     */
    @Override
    public SchoolApartmentDist selectSchoolApartmentDistById(Long id)
    {
        return schoolApartmentDistMapper.selectSchoolApartmentDistById(id);
    }

    /**
     * 查询学校公寓列表
     * 
     * @param schoolApartmentDist 学校公寓
     * @return 学校公寓
     */
    @Override
    public List<SchoolApartmentDist> selectSchoolApartmentDistList(SchoolApartmentDist schoolApartmentDist)
    {
        return schoolApartmentDistMapper.selectSchoolApartmentDistList(schoolApartmentDist);
    }

    /**
     * 新增学校公寓
     * 
     * @param schoolApartmentDist 学校公寓
     * @return 结果
     */
    @Override
    public int insertSchoolApartmentDist(SchoolApartmentDist schoolApartmentDist)
    {
        return schoolApartmentDistMapper.insertSchoolApartmentDist(schoolApartmentDist);
    }

    /**
     * 修改学校公寓
     * 
     * @param schoolApartmentDist 学校公寓
     * @return 结果
     */
    @Override
    public int updateSchoolApartmentDist(SchoolApartmentDist schoolApartmentDist)
    {
        return schoolApartmentDistMapper.updateSchoolApartmentDist(schoolApartmentDist);
    }

    /**
     * 批量删除学校公寓
     * 
     * @param ids 需要删除的学校公寓主键
     * @return 结果
     */
    @Override
    public int deleteSchoolApartmentDistByIds(Long[] ids)
    {
        return schoolApartmentDistMapper.deleteSchoolApartmentDistByIds(ids);
    }

    /**
     * 删除学校公寓信息
     * 
     * @param id 学校公寓主键
     * @return 结果
     */
    @Override
    public int deleteSchoolApartmentDistById(Long id)
    {
        return schoolApartmentDistMapper.deleteSchoolApartmentDistById(id);
    }
}
